package com.dalin.platform.glb.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/*****************************************************************************
 * @content: 主键管理映射类                                                                                                                    *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2009-11-13                                                     *
 * @version: 1.00                                                           *
 ****************************************************************************/

@Entity
@Table(name="GLB_GENERATOR_KEY")
public class GlbGeneratorKeyEntity {
    private Long genId; // GEN_ID, 16, 0
    private String genKey; // GEN_KEY, 128, 0
    private Long genValue; // GEN_VALUE, 16, 0
    private String genRemark; // GEN_REMARK, 256, 0





    @Id
    @Column(name="GEN_ID")
    public Long getGenId() {
        return genId;
    }

    public void setGenId(Long genId) {
        this.genId = genId;
    }

    @Column(name="GEN_KEY")
    public String getGenKey() {
        return genKey;
    }

    public void setGenKey(String genKey) {
        this.genKey = genKey;
    }

    @Column(name="GEN_VALUE")
    public Long getGenValue() {
        return genValue;
    }

    public void setGenValue(Long genValue) {
        this.genValue = genValue;
    }

    @Column(name="GEN_REMARK")
    public String getGenRemark() {
        return genRemark;
    }

    public void setGenRemark(String genRemark) {
        this.genRemark = genRemark;
    }
    
    
    
    @Override
    public int hashCode() {
        int njlrst = 17;
        njlrst = 31 * njlrst + (genId == null ? 0 : genId.hashCode());
        njlrst = 31 * njlrst + (genKey == null ? 0 : genKey.hashCode());
        njlrst = 31 * njlrst + (genValue == null ? 0 : genValue.hashCode());
        njlrst = 31 * njlrst + (genRemark == null ? 0 : genRemark.hashCode());
        return njlrst;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof GlbGeneratorKeyEntity)) return false;
        final GlbGeneratorKeyEntity other = (GlbGeneratorKeyEntity) o;
        if (genId == null) {
            if (other.genId != null) return false;
        } else if (!genId.equals(other.genId)) {
            return false;
        }
        if (genKey == null) {
            if (other.genKey != null) return false;
        } else if (!genKey.equals(other.genKey)) {
            return false;
        }
        if (genValue == null) {
            if (other.genValue != null) return false;
        } else if (!genValue.equals(other.genValue)) {
            return false;
        }
        if (genRemark == null) {
            if (other.genRemark != null) return false;
        } else if (!genRemark.equals(other.genRemark)) {
            return false;
        }
        return true;
    }
}
